using System;
using System.Collections.Generic;
using UMC.Data;
namespace UMC.WorkFlow.Entities
{
public partial class TaskKey
{
readonly static Action<TaskKey,object>[] _SetValues=new Action<TaskKey,object>[]{(r,t)=>r.Caption=Reflection.ParseObject(t, r.Caption),(r,t)=>r.Code=Reflection.ParseObject(t, r.Code),(r,t)=>r.Id=Reflection.ParseObject(t, r.Id),(r,t)=>r.ProviderKey=Reflection.ParseObject(t, r.ProviderKey),(r,t)=>r.SelectSQL=Reflection.ParseObject(t, r.SelectSQL),(r,t)=>r.Type=Reflection.ParseObject(t, r.Type),(r,t)=>r.ValueKey=Reflection.ParseObject(t, r.ValueKey)};
readonly static string[] _Columns=new string[]{"Caption","Code","Id","ProviderKey","SelectSQL","Type","ValueKey"};
protected override void SetValue(string name, object obv){
var index = Utility.Search(_Columns,name, StringComparer.CurrentCultureIgnoreCase);
if (index > -1)_SetValues[index](this, obv);
}
protected override void GetValues(Action<String, object> action){
AppendValue(action,"Caption", this.Caption);
AppendValue(action,"Code", this.Code);
AppendValue(action,"Id", this.Id);
AppendValue(action,"ProviderKey", this.ProviderKey);
AppendValue(action,"SelectSQL", this.SelectSQL);
AppendValue(action,"Type", this.Type);
AppendValue(action,"ValueKey", this.ValueKey);
}

 protected override RecordColumn[] GetColumns(){
 var cols = new RecordColumn[7];
cols[0]= RecordColumn.Column("Caption",this.Caption);
cols[1]= RecordColumn.Column("Code",this.Code);
cols[2]= RecordColumn.Column("Id",this.Id);
cols[3]= RecordColumn.Column("ProviderKey",this.ProviderKey);
cols[4]= RecordColumn.Column("SelectSQL",this.SelectSQL);
cols[5]= RecordColumn.Column("Type",this.Type);
cols[6]= RecordColumn.Column("ValueKey",this.ValueKey);
return cols;
}

}
}

